# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: KokaKiwi <admin@kokaelkiwi.eu>
# Contributor: James Bulmer <nekinie@gmail.com>

pkgname=nanomsg
pkgver=1.2
pkgrel=1
pkgdesc='Simple high-performance implementation of several "scalability protocols"'
url='https://nanomsg.org/'
license=(MIT)
arch=(loong64 x86_64)
depends=(glibc)
makedepends=(cmake)
source=(nanomsg-$pkgver.tar.gz::https://github.com/nanomsg/nanomsg/archive/$pkgver.tar.gz)
sha1sums=('810f26d8fb2943e5a4c34d751bc8cdaf544ba9fe')


build() {
  cd nanomsg-$pkgver
  cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib .
  make
}

check() {
  cd nanomsg-$pkgver
  ctest
}

package() {
  cd nanomsg-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}
